@extends('admin::layouts.master')
@section('title')
    预约单列表
@endsection

@section('tab')
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body ">
                        <form class="layui-form layui-col-space5">
                            {{--      <div class="layui-inline layui-show-xs-block">
                                      <input class="layui-input"  autocomplete="off" placeholder="开始日" name="start" id="start">
                                  </div>
                                  <div class="layui-inline layui-show-xs-block">
                                      <input class="layui-input"  autocomplete="off" placeholder="截止日" name="end" id="end">
                                  </div>--}}
                            <div class="layui-inline layui-show-xs-block">
                                <input type="text" name="key_word" value="{{$arr_search['key_word']}}"  placeholder="请输入订单编号" autocomplete="off" class="layui-input ">
                            </div>
                            <div class="layui-inline layui-show-xs-block">
                                <button class="layui-btn layui-btn-normal"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
                                <a class="layui-btn" onclick="location.reload()">
                                    <i class="layui-icon layui-icon-refresh"></i>
                                </a>
                            </div>
                        </form>
                    </div>

                    <div class="layui-card-body layui_overflow_y">

                        <table class="layui-table layui-form"  class="">
                            <thead>
                            <tr>
                                <th>序号</th>
                                <th>ID</th>
                                <th>编号</th>
                                <th>类型</th>
                                <th>日期</th>
                                <th>时段类型</th>
                                <th>时段</th>
                                <th>数量</th>
                                <th>费用</th>
                                <th>支付方式</th>
                                <th>订单状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($data as $key=>$value)
                                <tr>
                                    <td>{{$key+1}}</td>
                                    <td>{{$value['id']}}</td>
                                    <td>{{$value['order_sn']}}</td>
                                    <td>{{$value['extend']['main_type']['name']}}</td>
                                    <td>{{$value['appointment_date']}}</td>
                                    <td>{{$value['appointment_time_type']}}</td>
                                    <td>{{$value['appointment_times']}}</td>
                                    <td>{{$value['appointment_num']}}</td>
                                    <td>{{$value['price']}}</td>
                                    <td>{{$value['extend']['payment_method']['name']}}</td>
                                    <td>{{$value['extend']['order_state']['name']}}</td>
                                    <td class="td-manage">
                                        <button class="layui-btn layui-btn-xs" onclick="parent.xadmin.add_tab('预约单-{{$value['order_sn']}}','{{route("admin_shop_order_checkpoint_detail",['id'=>$value['id']])}}',true)" href="javascript:;" >详情</button>
                                    </td>
                                </tr>

                            @endforeach
                            @if($data_count == 0)
                                <tr>
                                    <td colspan="66" style="text-align: center">暂无数据</td>

                                </tr>

                            @endif
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-card-body ">
                        <div class="page">
                            {{$page_link}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

@section('tab_js')
    <script>
        layui.use(['form'], function(){
            var form = layui.form;

            //监听指定开关-修改状态
            form.on('switch(change_state)',
                function(obj){
                    change_state(this);
                    // layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                    //     offset: '60px'
                    // });
                    // layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', obj.othis)
                });
        });
    </script>
@endsection




